package org.calzz.jajb.io;

import java.util.Map;

/**
 * Main interface for Json readers. Contains a single method called used for
 * reading an object and presenting it as a <code>Map</code> of values. This
 * <code>Map</code> is later used by the Deserializer for constructing a
 * concrete object.
 * 
 * @author Marek Brodziak <marek.brodziak@gmail.com>
 * @author Piotr Pejas <piotr.pejas@gmail.com>
 * @since Feb 10, 2008
 */
public interface IReader {

	/**
	 * The main interface method. Presents a given complex object as a map
	 * recursive <code>Map</code>. The values in this map can be of those
	 * types: - <code>List<Object></code> - <code>Map<String, Object></code> -
	 * single values, like <code>String</code>s, <code>Integer</code>s,
	 * etc.
	 * @param json string to be deserialized
	 * @return recursive map representing a given object
	 */
	Map<String, Object> deserialize(String json);
}
